"""
.. module:: Stock
   :platform: Unix, Windows
   :synopsis: This class represents an equity/stock product

.. moduleauthor:: Nick Leaton <nickle@gmail.com>

"""
from Entities.Products.Product import Product

class Stock (Product):
    '''
    Class for an equity product
    '''
    
    def __init__ (self, name, currency, dividends=None):
        '''
        Args:
            name (str): Create a stock with name `name`
            currency (Currency): Denomination currency for the equity
            dividends (List<Dividends>): List of known dividends
        '''
        Product.__init__(self, name)
        self.currency = currency
        if dividends == None:
            self.dividends = []
        else:
            self.dividends = dividends